#pragma once
#include<sys/types.h>
#include<sys/stat.h>
#include<fcntl.h>
#include<stdlib.h>
#include<unistd.h>
#include<assert.h>
#include<string.h>
#include<stdio.h>
#define flush_no 1   //无缓冲
#define flush_line 2  //行缓存
#define flush_all 4  //满了在缓冲
#define SIZE 1024

typedef struct IO_FILE
{
    int fileno;
    int _flush;
     
    char inbuffer[SIZE];
    char outbuffer[SIZE];
    int out_pos;
}_FILE;

void _fseek(_FILE*stream,int num,int f);

_FILE* _fopen(const char*filename,const char*flag);

int _fwrite (_FILE*fp,const char*s ,int len);

void _fclose(_FILE* fp);

void _fflush(_FILE* fp);

size_t _fread(void*ptr,size_t size,size_t num, _FILE*stream );
